<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!--    <meta name="_csrf" th:content="${_csrf.token}"/>-->
    <!--    <meta name="_csrf_header" th:content="${_csrf.headerName}"/>-->
    <title>登录</title>
    <script th:src="@{../js/jquery-3.5.1.min.js}"></script>
    <script th:src="@{../bootstrap-4.4.1-dist/js/bootstrap.bundle.min.js}"></script>
    <link rel="stylesheet" th:href="@{../bootstrap-4.4.1-dist/css/bootstrap.min.css}">
    <link rel="stylesheet" th:href="@{../css/signin.css}">
    <link rel="stylesheet" th:href="@{../css/common.css}">
</head>
<body>
<div th:include="navigate::navbar"></div>
<div class="container">
    <div class="container col-10 form-container">
        <div th:if="${param.logout}">
            You have been logged out.
        </div>
        <div id="login_form" class="form-signin">
            <h2 class="form-signin-heading">登录</h2>
            <div class="form-group">
                <label for="username" class="sr-only" hidden>用户名s</label>
                <input type="text" id="username" name="username" class="form-control" placeholder="用户名" required
                       autofocus>
            </div>
            <div class="form-group">
                <label for="password" class="sr-only" hidden>密码</label>
                <input type="password" id="password" name="password" class="form-control" placeholder="密码" required>
            </div>
            <div class="form-group">
                <label for="validateCode" class="sr-only" hidden>验证码</label>
                <input type="password" id="validateCode" name="validateCode" class="form-control" placeholder="验证码"
                       required>
                <img id="codeImg" src="/vCode/image" alt="点击切换图片">

            </div>
            <div id="login_info">
                <!--登录后返回的结果-->
            </div>
            <div class="form-group form-check">
                <input type="checkbox" class="form-check-input" id="rememberMe" name="remember-me">
                <label class="form-check-label" for="rememberMe">记住我</label>
            </div>
            <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
            <button id="submitBtn" class="btn btn-lg btn-primary btn-block" type="submit">登录</button>
        </div>
    </div>
    <div id="userInfo" th:include="navigate::info"></div>
</div>
<script th:src="@{../js/login_page.js}"></script>
</body>
</html>